//Pet.h
#ifndef PET_H_
#define PET_H_
#include <string>
using namespace std;
class Pet {
private:
    double weight;
    string name;
public:
    Pet(double w = 0, string n = "未知") : weight(w) , name(n) {}
    virtual ~Pet() {}
    virtual void Bark() = 0;

    double getWeight() {
        return weight;
    }

    void setWeight(double weight) {
        this->weight = weight;
    }

    string getName() {
        return name;
    }

    void setName(string name) {
        this->name = name;
    }
};
#endif